"Buboes, phlegm, blood and guts! Boils, bogeys, rot and pus! Blisters, fevers, weeping sores! From your wounds the fester pours."
-- The Chant of Nurgle
The following analyses require jupyterthemes, numpy, pandas, and plotly. Install them with pip.
from jupyterthemes.stylefx import set_nb_theme
set_nb_theme('grade3')
import os
PREFIX = os.environ.get('PWD', '.')
# PREFIX = "../build/outputs"
import numpy
import pandas
import plotly.graph_objs as go
import plotly.figure_factory as ff
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode(connected=True)
Reading input files for the simulation.
compounds = pandas.read_csv(os.path.join(PREFIX, "compounds.csv"))
num_compounds = compounds.shape[0]
print('[{}] compounds were loaded.'.format(num_compounds))
metabolism = pandas.read_csv(os.path.join(PREFIX, "metabolism.csv"))
print('[{}] reactions were loaded.'.format(metabolism.shape[0]))
Reading timecourse data first.
timecourse = pandas.read_csv(os.path.join(PREFIX, "timecourse.csv"))
timecourse = timecourse.rename(columns={timecourse.columns[0]: "Time"})
pddata = pandas.DataFrame(timecourse.values[: , : num_compounds], timecourse.index, timecourse.columns[ : num_compounds])
indices = [0] + list(range(num_compounds, timecourse.shape[1]))
fluxes = pandas.DataFrame(timecourse.values[: , indices], timecourse.index, timecourse.columns[indices])
Plotting concentrations of compounds.
plot1(pddata, "compound_markers", nsteps=15)
Plotting time series of compound concentrations.
plot2(pddata, "compound_lines")
plot3(fluxes, "flux_markers", nsteps=15)